package me.youline.dataServer.entity;

import java.util.Date;

import org.apache.commons.lang3.StringUtils;

public class UserDeviceToken {
	
	private Long userId;
	
	private String deviceToken;
	
	private Date updateTime;

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public String getDeviceToken() {
		return deviceToken;
	}

	public void setDeviceToken(String deviceToken) {
		this.deviceToken = deviceToken;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	
	/**
	 * 判断当前设备号是否有效，即为空的字符串表示无效
	 * @return
	 */
	public boolean isValidDeviceToken(){
		return !StringUtils.isBlank(this.getDeviceToken());
	}
	
}
